package com.kstech.mp3604.data

import androidx.room.Database
import androidx.room.RoomDatabase
import androidx.room.TypeConverters
import com.kstech.mp3604.bean.ControlInitData
import com.kstech.mp3604.bean.ErrorInfo
import com.kstech.mp3604.bean.Log
import com.kstech.mp3604.bean.TaskData
import com.kstech.mp3604.data.dao.ErrorInfoDao
import com.kstech.mp3604.data.dao.InitConfigDao
import com.kstech.mp3604.data.dao.LogDao
import com.kstech.mp3604.data.dao.TaskDataDao
import com.kstech.mp3604.data.typeConvert.BoxCoordinateListTypeConvert
import com.kstech.mp3604.data.typeConvert.StackCoordinateListTypeConvert

/**
 * author: blankii
 * created on: 2025/3/18 14:27
 * description:
 */
@Database(
    entities = [TaskData::class, ErrorInfo::class, Log::class, ControlInitData::class],
    version = 3,
    exportSchema = false
)
@TypeConverters(
    StackCoordinateListTypeConvert::class,
//    LiftingSpecificationTypeConvert::class,
//    SaveSpecificationTypeConvert::class,
    BoxCoordinateListTypeConvert::class
)
abstract class ZRoomDB : RoomDatabase() {
    //创建userDao
    abstract fun taskDataDao(): TaskDataDao

    abstract fun errorInfoDao(): ErrorInfoDao

    abstract fun logDao(): LogDao

    abstract fun initConfigDao(): InitConfigDao
}